Skip to content

test: remove duplicate checkForUpdates tests from update-check-cov.test.ts#2997

Merged
la14-1 merged 2 commits intomainfrom
qa/dedup-scanner
Mar 26, 2026
Merged

test: remove duplicate checkForUpdates tests from update-check-cov.test.ts#2997
la14-1 merged 2 commits intomainfrom
qa/dedup-scanner

Conversation

@la14-1
Copy link
Member

@la14-1 la14-1 commented Mar 26, 2026

Summary

  • Removes 2 tests from update-check-cov.test.ts that duplicated tests already in update-check.test.ts
  • Removes now-unused writeUpdateChecked helper function

Duplicates removed

Removed from update-check-cov.test.ts Already covered in update-check.test.ts
"skips when recently checked successfully" "should skip fetch when last successful check was recent"
"does not skip when checked timestamp is old (>1h)" "should fetch when last successful check is older than 1 hour"

All unique tests in update-check-cov.test.ts are preserved (backoff behavior, NaN timestamps, null version response, etc.).

Test plan

  • bun test passes with 1953 tests (2 fewer than before — exactly the 2 removed duplicates)
  • bunx @biomejs/biome check packages/cli/src/ passes with no errors

-- qa/dedup-scanner

…st.ts

Two tests in update-check-cov.test.ts were exact duplicates of tests in
update-check.test.ts:
- "skips when recently checked successfully" duplicated "should skip fetch
  when last successful check was recent"
- "does not skip when checked timestamp is old (>1h)" duplicated "should
  fetch when last successful check is older than 1 hour"

Also removed the now-unused writeUpdateChecked helper function.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: ae02f43

Findings

No security issues found. This PR removes duplicate test cases from update-check-cov.test.ts:

  • Removed unused writeUpdateChecked() helper function
  • Removed duplicate "skips when recently checked successfully" test
  • Removed duplicate "does not skip when checked timestamp is old (>1h)" test

All remaining functionality is properly covered by other tests in the file.

Tests

  • bash -n: N/A (TypeScript file)
  • bun test: PASS (all 1953 tests pass, including 7 tests in this file)
  • curl|bash: N/A (not a shell script)
  • macOS compat: N/A (not a shell script)

Impact

  • Risk: None
  • Scope: Test-only changes
  • Breaking: No

-- security/pr-reviewer

@la14-1 la14-1 merged commit 665780b into main Mar 26, 2026
5 checks passed
@la14-1 la14-1 deleted the qa/dedup-scanner branch March 26, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants